import request from "@/utils/request";


export function get() {
    return request({
        method: 'get',
        url: '/access',
    })
}

export function add(data) {
    return request({
        method: 'post',
        url: '/access',
        data
    })
}


export function getAvailable() {
    return request({
        method: 'get',
        url: '/access/available',
    })
}

export function getOne(id) {
    return request({
        method: 'get',
        url: '/access/' + id,
    })
}

export function update(id, data) {
    return request({
        method: 'put',
        url: '/access/' + id,
        data
    })
}

export function del(id) {
    return request({
        method: 'delete',
        url: '/access/' + id,
    })
}